<% if (addOnEnabled.start) { ignoreFile() } %>import { defineConfig } from "vite";
import { devtools } from '@tanstack/devtools-vite'
import viteReact from "@vitejs/plugin-react";<% if (tailwind) { %>
import tailwindcss from "@tailwindcss/vite";
<% } %><%if (fileRouter) { %>
import { tanstackRouter } from "@tanstack/router-plugin/vite";<% } %><% if (addOnEnabled['module-federation']) { %>
import { federation } from "@module-federation/vite";<% } %>
import { fileURLToPath, URL } from 'node:url';<% if (addOnEnabled['module-federation']) { %>
import federationConfig from "./module-federation.config.js";<% } %><% for(const integration of integrations.filter(i => i.type === 'vite-plugin')) { %><%- integrationImportContent(integration) %>
<% } %>

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [devtools(), <% for(const integration of integrations.filter(i => i.type === 'vite-plugin')) { %><%- integrationImportCode(integration) %>,<% } %> <% if(fileRouter) { %>tanstackRouter({
    target: "react",
    autoCodeSplitting: true,
  }), <% } %>viteReact(<% if (addOnEnabled.compiler) { %>{
    babel: {
      plugins: ["babel-plugin-react-compiler"],
    },
  }<% } %>)<% if (tailwind) { %>, tailwindcss()<% } %><% if (addOnEnabled['module-federation']) { %>, federation(federationConfig)<% } %>],
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url)),
    },
  }
});
